StoredLearningSession Constructor (SessionView, AttemptItemIdentifier, PackageStore)

Access a LearningSession that is based on a user's attempt of the the content. The attempt must already have been started (Start) in order to use this constructor.

Parent Type: StoredLearningSession

Namespace: Microsoft.LearningComponents.Storage

Assembly: Microsoft.LearningComponents.Storage.dll

Syntax
C#

public StoredLearningSession (
SessionView view,
AttemptItemIdentifier attemptId,
PackageStore packageStore

)

Parameters

view

The view which will be shown of the attempt. Valid values are: Execute, Review and RandomAccess.

attemptId

The LearningStore identifier of the attempt for the session.

packageStore

The package store that contains the package files of the package related to the attempt.

Exceptions
Exception type Condition
ArgumentOutOfRangeException

Thrown if the view does not represent a valid view for the session, of if attemptId is not a positive value.

ArgumentNullException

Thrown if a packageStore or attemptId is not provided.

Remarks

If an attemptId is passed to this constructor that does not represent a valid attempt, this method may not throw an exception. Instead, the first time the attempt is accessed in LearningStore, that method or property will throw the exception.